<?php 
/**
* @author Oliver Leisalu, Inditel Meedia
* @package DomFg
* @subpackage Input
*/
class DomFgCheckBoxGroup extends DomFgMultiSelect {
	
	protected $vertical = false;
	
	public function checked( array $checked ) {
		$this->selected( $checked );
	}
	
	public static function parsePost( $name, &$value ) {
		foreach($value as &$val)
			$val = (bool)$val;
		return $value;
	}
	
	public function vertical( $vertical ) {
		$this->vertical = (bool)$vertical;
		return $this;
	}
	
	public function render() {
		$this->values = self::parseArrayInput( $this->values, $this->selected, $this->property, $this->keyProperty );
		
		$renderer = $this->getRenderer();
		$renderer->assign('input', $this );
		return $renderer->fetch('Input/CheckBoxGroup.html');
	}
	

}
?>